using System.Linq;
using Microsoft.Practices.Prism.ViewModel;
using TFS.Kanban.Domain;

namespace TFS.Kanban.Modules.ProjectExplorer.ViewModels
{
    public class UserStoryViewModel : NotificationObject
    {
        private readonly IUserStory _userStory;

        public UserStoryViewModel(IUserStory userStory)
        {
            _userStory = userStory;
        }

        public int Id { get { return _userStory.Id; } }
        public string Name { get { return _userStory.Name; } }

        public int TaskCount { get { return _userStory.Tasks.Count(); } }
    }
}